-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
langref corrections and clarifications #24832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
IOKG04
wants to merge
10
commits into
ziglang:master
Choose a base branch
from
IOKG04:somerandomdocschanges
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
probably closes ziglang#16795
- shifting out specific bits is safety-checked Illegal Behavior, and doesn't only result in `undefined` (or is "guarantied by the caller") - unified error messages for comptime and runtime checks - made said error messages a bit more descriptive closes ziglang#19679
probably closes ziglang#6891
I can see an argument why it shouldnt, readability, but I'd argue that consistency is about as important in documentation and camelCase is still very much readable. also did a small fix, I forgot a *safety-checked* in `@shrExact()` langreft
didn't know these tests existed ;w;
127b09d to
3814cb2
Compare
Member
|
In an effort to make this easier to review, I've cherry-picked the linked list documentation commit into its own PR here: #25705 |
Contributor
Author
Alright, if yours gets merged, I'll remove it from mine. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
std.Random.intRangeAtMostBiased()was self-referential, it now points tointRangeAtMost()as the function it is a constant time replacement of. (fixes std.Random.intRangeAtMostBiased documentation references itself #24809)removeof Singly/DoublyLinkedList relies on the node being in the list #25705.@This()doesn't work with tuples. (closes document tuples and their (lack of) interaction with@This()#24599)@shlExact()and@shrExact()documentation to say Illegal Behavior is caused by shifting out specific bits, not that the "caller guaranties that the shift will not shift any 1 bits out" or that the "result is undefined". Also updated both runtime and comptime error messages for the safety-checked IB to be more specific. (closes docs:@shlExact,@shrExactcause illegal behavior on shifted-out bits #19679)@typeInfo(anyerror).error_set == null. (closes Incorrect TypeInfo for anyerror #6891)Regarding 3, I only added a "non-tuple" before the "struct" in the langref for
@This(), if someone has a more descriptive version, I'll gladly take that.Regarding 5, I added that to the doc comment on the
ErrorSettype, if it should be added to theerror_setfield ofTypetoo, I can do that too.Regarding 6, I can an argument for keeping snake_case for those functions, readability, but I'd argue that camelCase is also readable and that not conforming to the naming conventions might confuse some people.
If there are any more langref fixes/additions, I can add those too.